package com.smartleanx.module.hrm.util;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.BeansException;

/**
 * Bean 属性复制工具类
 * 
 * @author yanglihao
 */
@Slf4j
public class SaasBeanUtils extends BeanUtils {

    /**
     * Bean属性复制工具，只复制同名属性，区分大小写
     *
     * @param src 源对象
     * @param dest 目标对象
     */
    public static void copyBeanProps(Object src, Object dest) {
        try {
            copyProperties(src, dest);
        } catch (BeansException e) {
            log.error(e.getMessage());
        }
    }
}
